﻿
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<link href="/Content/ytcms/css/Hotel.css" rel="stylesheet" />
<link href="/Content/raty-master/lib/jquery.raty.css" rel="stylesheet" />
<script src="/Content/raty-master/lib/jquery.raty.js"></script>
@model IQueryable<YTCMS.Domain.Entities.hotel>
@using YTCMS.Core;
@using App.Common
<div class="jumbotron banner">
    <img src="/Content/ytcms/img/hotel.jpg" class="banner_img" />
    <div class="container navbar">
        <div class="row">
            <div class="col-md-4">
                <img src="/Content/ytcms/img/shihui.png" />
                <div class="navbarmsg">
                    <span>低价保证</span>
                    <span>精选合作酒店，市场最低价</span>
                </div>
            </div>
            <div class="col-md-4">
                <img src="/Content/ytcms/img/bianjie.png" />
                <div class="navbarmsg">
                    <span>方便快捷</span>
                    <span>最快的速度确认订单，直接入住</span>
                </div>
            </div>
            <div class="col-md-4">
                <img src="/Content/ytcms/img/wuyou.png" />
                <div class="navbarmsg">
                    <span>安全保障</span>
                    <span>精选签约酒店，无忧出行</span>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="jumbotron Hotel">
    <div class="container">
        <div class="main">
            <div class="span12">
                <div class="page-header">
                    <div class="span6">
                        <img src="/Content/ytcms/img/hot.png" />
                        <span class="push-hotel">酒店精品推荐</span>
                    </div>
                    <div class="span6">
                        <ul>
                            <li class="active"><a href="#aldq"><span>阿里</span></a></li>
                            <li><a href="#nqdq"><span>那曲</span></a></li>
                            <li><a href="#rkzdq"><span>日喀则</span></a></li>
                            <li><a href="#lsdq"><span>拉萨</span></a></li>
                            <li><a href="#sndq"><span>山南</span></a></li>
                            <li><a href="#sndq"><span>林芝</span></a></li>
                            <li><a href="#sndq"><span>昌都</span></a></li>
                        </ul>
                    </div>
                </div>
                <div class="properties-grid">
                    <div class="row">
                        @foreach (var item in Model.Where(s=>s.IsPush == 1).YTTake(3))
                        {
                           
                            <div class="span4">
                                <div class="view view-first">
                                    @*<img src="/Content/ytcms/img/hotel1.png" class="hotel_img" />*@
                                    <img src="@T.GetImages(item.Id,Images.酒店).YTFirst().Replace("_120x120","")" class="hotel_img" />
                                    
                                    <div class="pure_list_mask">
                                        <a href="/Hotel/Details?id=@item.Id"><img src="/Content/ytcms/img/qkk.png" class="qkk" /></a>
                                    </div>
                                </div>
                                <div class="title">
                                    <span>
                                        @item.Name
                                    </span>
                                    <div name="score" data-score="@item.Leve" ></div>
                                </div>
                            </div>
                        }
                        
                        

                    </div>
                </div>
                @{
                       
                        ///阿里地区

                    var aldq = Model.Where(s => s.CityId.Contains("1")).YTTake(6);
                    if (aldq.Count() > 0)
                                {
                        <div class="properties-grid">
                            <div class="group">
                                <span class="title" id="aldq">
                                    阿里地区
                                </span>
                            </div>
                            
                                    <div class="row">
                                        @foreach (var item in aldq.YTTake(3))
                                        {
                                            <div class="span4">
                                                <div class="view view-first">
                                                    <img src="@T.GetImages(item.Id,Images.酒店).YTFirst().Replace("_120x120","")" class="hotel_img" />
                                                    <div class="pure_list_mask">
                                                        <a href="/Hotel/Details?id=@item.Id"><img src="/Content/ytcms/img/qkk.png" class="qkk" /></a>
                                                    </div>
                                                </div>
                                                <div class="title">
                                                    <span>
                                                        @item.Name
                                                    </span>
                                                    <div name="score" data-score="@item.Leve"></div>
                                                </div>
                                            </div>
                                        }
                                        
                                    </div>
                                    <div class="row">
                                        @foreach (var item in aldq.YTSkip(3,3))
                                        {
                                            <div class="span4">
                                                <div class="view view-first">
                                                    <img src="@T.GetImages(item.Id,Images.酒店).YTFirst().Replace("_120x120","")" class="hotel_img" />
                                                    <div class="pure_list_mask">
                                                        <a href="/Hotel/Details?id=@item.Id"><img src="/Content/ytcms/img/qkk.png" class="qkk" /></a>
                                                    </div>
                                                </div>
                                                <div class="title">
                                                    <span>
                                                        @item.Name
                                                    </span>
                                                    <div name="score" data-score="@item.Leve"></div>
                                                </div>
                                            </div>
                                        }
                                    </div>
                           
                            
                            
                        </div>
                                } 
                        
                                
                       ///那曲地区
                       ///

                                var nqdq = Model.Where(s => s.CityId.Contains("2")).YTTake(6);
                                if (nqdq.Count()>0 )
                                {
                        <div class="properties-grid">
                            <div class="group">
                                <span class="title" id="nqdq">
                                    那曲地区
                                </span>
                            </div>
                            
                                    <div class="row">
                                        @foreach (var item in nqdq.YTTake(3))
                                        {
                                            <div class="span4">
                                                <div class="view view-first">
                                                    <img src="@T.GetImages(item.Id,Images.酒店).YTFirst().Replace("_120x120","")" class="hotel_img" />
                                                    <div class="pure_list_mask">
                                                        <a href="/Hotel/Details?id=@item.Id"><img src="/Content/ytcms/img/qkk.png" class="qkk" /></a>
                                                    </div>
                                                </div>
                                                <div class="title">
                                                    <span>
                                                        @item.Name
                                                    </span>
                                                    <div name="score" data-score="@item.Leve"></div>
                                                </div>
                                            </div>
                                        }
                                        
                                    </div>
                                    <div class="row">
                                        @foreach (var item in nqdq.YTSkip(3, 3))
                                        {
                                            <div class="span4">
                                                <div class="view view-first">
                                                    <img src="@T.GetImages(item.Id,Images.酒店).YTFirst().Replace("_120x120","")" class="hotel_img" />
                                                    <div class="pure_list_mask">
                                                        <a href="/Hotel/Details?id=@item.Id"><img src="/Content/ytcms/img/qkk.png" class="qkk" /></a>
                                                    </div>
                                                </div>
                                                <div class="title">
                                                    <span>
                                                        @item.Name
                                                    </span>
                                                    <div name="score" data-score="@item.Leve"></div>
                                                </div>
                                            </div>
                                        }
                                    </div>
                           
                            
                            
                        </div>
                                } 
                                
                                
                       ///日喀则地区
                       ///

                                var rkzdq = Model.Where(s => s.CityId.Contains("3")).YTTake(6);
                                if (rkzdq.Count()>0 )
                                {
                        <div class="properties-grid">
                            <div class="group">
                                <span class="title" id="rkzdq">
                                    日喀则地区
                                </span>
                            </div>
                            
                                    <div class="row">
                                        @foreach (var item in rkzdq.YTTake(3))
                                        {
                                            <div class="span4">
                                                <div class="view view-first">
                                                    <img src="@T.GetImages(item.Id,Images.酒店).YTFirst().Replace("_120x120","")" class="hotel_img" />
                                                    <div class="pure_list_mask">
                                                        <a href="/Hotel/Details?id=@item.Id"><img src="/Content/ytcms/img/qkk.png" class="qkk" /></a>
                                                    </div>
                                                </div>
                                                <div class="title">
                                                    <span>
                                                        @item.Name
                                                    </span>
                                                    <div name="score" data-score="@item.Leve"></div>
                                                </div>
                                            </div>
                                        }
                                        
                                    </div>
                                    <div class="row">
                                        @foreach (var item in rkzdq.YTSkip(3, 3))
                                        {
                                            <div class="span4">
                                                <div class="view view-first">
                                                    <img src="@T.GetImages(item.Id,Images.酒店).YTFirst().Replace("_120x120","")" class="hotel_img" />
                                                    <div class="pure_list_mask">
                                                        <a href="/Hotel/Details?id=@item.Id"><img src="/Content/ytcms/img/qkk.png" class="qkk" /></a>
                                                    </div>
                                                </div>
                                                <div class="title">
                                                    <span>
                                                        @item.Name
                                                    </span>
                                                    <div name="score" data-score="@item.Leve"></div>
                                                </div>
                                            </div>
                                        }
                                    </div>
                           
                            
                            
                                </div>
                                }


                                ///拉萨地区
                       ///

                                var lsdq = Model.Where(s => s.CityId.Contains("4")).YTTake(6);
                                if (lsdq.Count() > 0 )
                                {
                        <div class="properties-grid">
                            <div class="group">
                                <span class="title" id="lsdq">
                                    拉萨地区
                                </span>
                            </div>
                            
                                    <div class="row">
                                        @foreach (var item in lsdq.YTTake(3))
                                        {
                                            <div class="span4">
                                                <div class="view view-first">
                                                    <img src="@T.GetImages(item.Id,Images.酒店).YTFirst().Replace("_120x120","")" class="hotel_img" />
                                                    <div class="pure_list_mask">
                                                        <a href="/Hotel/Details?id=@item.Id"><img src="/Content/ytcms/img/qkk.png" class="qkk" /></a>
                                                    </div>
                                                </div>
                                                <div class="title">
                                                    <span>
                                                        @item.Name
                                                    </span>
                                                    <div name="score" data-score="@item.Leve"></div>
                                                </div>
                                            </div>
                                        }
                                        
                                    </div>
                                    <div class="row">
                                        @foreach (var item in lsdq.YTSkip(3, 3))
                                        {
                                            <div class="span4">
                                                <div class="view view-first">
                                                    <img src="@T.GetImages(item.Id,Images.酒店).YTFirst().Replace("_120x120","")" class="hotel_img" />
                                                    <div class="pure_list_mask">
                                                        <a href="/Hotel/Details?id=@item.Id"><img src="/Content/ytcms/img/qkk.png" class="qkk" /></a>
                                                    </div>
                                                </div>
                                                <div class="title">
                                                    <span>
                                                        @item.Name
                                                    </span>
                                                    <div name="score" data-score="@item.Leve"></div>
                                                </div>
                                            </div>
                                        }
                                    </div>
                           
                            
                            
                                </div>
                                }



                                ///山南地区
                       ///

                                var sndq = Model.Where(s => s.CityId.Contains("5")).YTTake(6);
                                if (sndq.Count() > 0)
                                {
                        <div class="properties-grid">
                            <div class="group">
                                <span class="title" id="sndq">
                                    山南地区
                                </span>
                            </div>
                            
                                    <div class="row">
                                        @foreach (var item in sndq.YTTake(3))
                                        {
                                            <div class="span4">
                                                <div class="view view-first">
                                                    <img src="@T.GetImages(item.Id,Images.酒店).YTFirst().Replace("_120x120","")" class="hotel_img" />
                                                    <div class="pure_list_mask">
                                                        <a href="/Hotel/Details?id=@item.Id"><img src="/Content/ytcms/img/qkk.png" class="qkk" /></a>
                                                    </div>
                                                </div>
                                                <div class="title">
                                                    <span>
                                                        @item.Name
                                                    </span>
                                                    <div name="score" data-score="@item.Leve"></div>
                                                </div>
                                            </div>
                                        }
                                        
                                    </div>
                                    <div class="row">
                                        @foreach (var item in sndq.YTSkip(3, 3))
                                        {
                                            <div class="span4">
                                                <div class="view view-first">
                                                    <img src="@T.GetImages(item.Id,Images.酒店).YTFirst().Replace("_120x120","")" class="hotel_img" />
                                                    <div class="pure_list_mask">
                                                        <a href="/Hotel/Details?id=@item.Id"><img src="/Content/ytcms/img/qkk.png" class="qkk" /></a>
                                                    </div>
                                                </div>
                                                <div class="title">
                                                    <span>
                                                        @item.Name
                                                    </span>
                                                    <div name="score" data-score="@item.Leve"></div>
                                                </div>
                                            </div>
                                        }
                                    </div>
                           
                            
                            
                                </div>
                                }   
                                
                                                                ///林芝地区
                       ///

                                var lzdq = Model.Where(s => s.CityId.Contains("6")).YTTake(6);
                                if (lzdq.Count() > 0 )
                                {
                        <div class="properties-grid">
                            <div class="group">
                                <span class="title" id="lzdq">
                                    林芝地区
                                </span>
                            </div>
                            
                                    <div class="row">
                                        @foreach (var item in lzdq.YTTake(3))
                                        {
                                            <div class="span4">
                                                <div class="view view-first">
                                                    <img src="@T.GetImages(item.Id,Images.酒店).YTFirst().Replace("_120x120","")" class="hotel_img" />
                                                    <div class="pure_list_mask">
                                                        <a href="/Hotel/Details?id=@item.Id"><img src="/Content/ytcms/img/qkk.png" class="qkk" /></a>
                                                    </div>
                                                </div>
                                                <div class="title">
                                                    <span>
                                                        @item.Name
                                                    </span>
                                                    <div name="score" data-score="@item.Leve"></div>
                                                </div>
                                            </div>
                                        }
                                        
                                    </div>
                                    <div class="row">
                                        @foreach (var item in lzdq.YTSkip(3, 3))
                                        {
                                            <div class="span4">
                                                <div class="view view-first">
                                                    <img src="@T.GetImages(item.Id,Images.酒店).YTFirst().Replace("_120x120","")" class="hotel_img" />
                                                    <div class="pure_list_mask">
                                                        <a href="/Hotel/Details?id=@item.Id"><img src="/Content/ytcms/img/qkk.png" class="qkk" /></a>
                                                    </div>
                                                </div>
                                                <div class="title">
                                                    <span>
                                                        @item.Name
                                                    </span>
                                                    <div name="score" data-score="@item.Leve"></div>
                                                </div>
                                            </div>
                                        }
                                    </div>
                           
                            
                            
                                </div>
                                }    
                                
                                
                                ///昌都地区
                       ///

                                var cddq = Model.Where(s => s.CityId.Contains("7")).YTTake(6);
                                if (cddq.Count() > 0 )
                                {
                        <div class="properties-grid">
                            <div class="group">
                                <span class="title" id="cddq">
                                    昌都地区
                                </span>
                            </div>
                            
                                    <div class="row">
                                        @foreach (var item in cddq.YTTake(3))
                                        {
                                            <div class="span4">
                                                <div class="view view-first">
                                                    <img src="@T.GetImages(item.Id,Images.酒店).YTFirst().Replace("_120x120","")" class="hotel_img" />
                                                    <div class="pure_list_mask">
                                                        <a href="/Hotel/Details?id=@item.Id"><img src="/Content/ytcms/img/qkk.png" class="qkk" /></a>
                                                    </div>
                                                </div>
                                                <div class="title">
                                                    <span>
                                                        @item.Name
                                                    </span>
                                                    <div name="score" data-score="@item.Leve"></div>
                                                </div>
                                            </div>
                                        }
                                        
                                    </div>
                                    <div class="row">
                                        @foreach (var item in cddq.YTSkip(3, 3))
                                        {
                                            <div class="span4">
                                                <div class="view view-first">
                                                    <img src="@T.GetImages(item.Id,Images.酒店).YTFirst().Replace("_120x120","")" class="hotel_img" />
                                                    <div class="pure_list_mask">
                                                        <a href="/Hotel/Details?id=@item.Id"><img src="/Content/ytcms/img/qkk.png" class="qkk" /></a>
                                                    </div>
                                                </div>
                                                <div class="title">
                                                    <span>
                                                        @item.Name
                                                    </span>
                                                    <div name="score" data-score="@item.Leve"></div>
                                                </div>
                                            </div>
                                        }
                                    </div>
                           
                            
                            
                                </div>
                                }    
                }

                
                
            </div>
        </div>
    </div>
</div>

<script>
    $(function () {
        $("div[name='score']").raty({
            score: function () {
                return $(this).attr('data-score');
            },
            path: "/Content/raty-master/lib/images",
            number: 7,
            readOnly: true
        });
    })
</script>